package com.whmskj.xjlhsc.pc.productionreport.task.mapper;

import com.whmskj.xjlhsc.pc.productionreport.report.pojo.DayReportsVO;
import com.whmskj.xjlhsc.pc.productionreport.task.pojo.DayVO;
import com.whmskj.xjlhsc.pc.productionreport.task.pojo.EfficiencyVO;
import com.whmskj.xjlhsc.pc.productionreport.task.pojo.MonthVO;
import com.whmskj.xjlhsc.pc.productionreport.task.pojo.YieldInquiryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProductionMapper {
    List<DayVO> getDayProductionData();

    void insertDayProductionData(List<DayVO> dayProductionData);

    List<MonthVO> getMonthProductionData();

    void insertMonthProductionData(List<MonthVO> monthProductionData);

    List<EfficiencyVO> getEfficiencyData();

    void insertEfficiencyData(List<EfficiencyVO> efficiencyData);

    List<YieldInquiryVO> getYieldInquiry();

    void insertYieldInquiry(List<YieldInquiryVO> yieldInquiry);

    void insertQianfangDayReport(List<DayReportsVO> qianfang);

    void insertXShaDayReport(List<DayReportsVO> xiSha);

    void insertLuoTongDayReport(List<DayReportsVO> luoTong);

    List<YieldInquiryVO> getYieldInquiryWan();

    @Select("select count(*) from dailyProductionReportSctj01 where date1 = #{localDate}")
    Integer getDayProductionDataByDate(String localDate);

    @Select("select count(*) from dailySctj06Channel where date1 = #{localDate}")
    Integer getDayProductionDataByDateLuo(String localDate);

    @Select("select count(*) from sctj05ShivaDaily where date1 = #{localDate}")
    Integer getDayProductionDataByDateXi(String localDate);

    @Select("select count(*) from dailyNewspaperSctj04 where date1 = #{localDate}")
    Integer getDayProductionDataByDateQian(String localDate);

    @Select("select count(*) from outputQuerySctj03 where classes = '晚班' and date1 = #{localDate}")
    Integer getDayProductionDataByyieldInquiry1(String localDate);

    @Select("select count(*) from outputQuerySctj03 where classes = '早班' and date1 = #{localDate}")
    Integer getDayProductionDataByyieldInquiry2(String localDate);

    @Select("select count(*) from efficiencyOfSctj08 where date1 = #{localDate}")
    Integer getDayProductionDataByEfficiency(String localDate);

    @Select("select count(*) from monthlyProductionStatisticsRepor where date1 = #{month}")
    Integer getDayProductionDataByMonthTask(String month);
}
